cargo.git
11 years agoauto merge of #107 : alexcrichton/cargo/issue-102, r=wycats
bors [Tue, 1 Jul 2014 22:49:29 +0000 (22:49 +0000)]
auto merge of #107 : alexcrichton/cargo/issue-102, r=wycats

Closes #102

11 years agoDon't call generic methods on trait objects
Alex Crichton [Tue, 1 Jul 2014 22:40:33 +0000 (15:40 -0700)]
Don't call generic methods on trait objects

Closes #102

11 years agoauto merge of #100 : rust-lang/cargo/meta-packages, r=alexcrichton
bors [Tue, 1 Jul 2014 06:30:02 +0000 (06:30 +0000)]
auto merge of #100 : rust-lang/cargo/meta-packages, r=alexcrichton

This allows a single git repository to have multiple packages contained inside.

* Cargo will look for `Cargo.toml`s located anywhere inside the project.
* Cargo will stop searching once it reaches a submodule, to avoid accidentally exporting someone else's packages. It is still possible to explicitly depend on packages from a submodule using the `path=` syntax on dependencies.

11 years agoImprovements based on the review
Yehuda Katz [Tue, 1 Jul 2014 06:27:33 +0000 (23:27 -0700)]
Improvements based on the review

11 years agoauto merge of #101 : alexcrichton/cargo/fix-git-1.7, r=wycats
bors [Tue, 1 Jul 2014 04:15:54 +0000 (04:15 +0000)]
auto merge of #101 : alexcrichton/cargo/fix-git-1.7, r=wycats

Apparently these versions of git are broken for `git fetch $url`, so we have to
resort to `git fetch origin` and then just pray that it hasn't changed in the
meantime.

11 years agoFix fetch() on git < 1.7.3
Alex Crichton [Tue, 1 Jul 2014 02:37:55 +0000 (19:37 -0700)]
Fix fetch() on git < 1.7.3

Apparently these versions of git are broken for `git fetch $url`, so we have to
resort to `git fetch origin` and then just pray that it hasn't changed in the
meantime.

11 years agoMeta-packages
Yehuda Katz [Tue, 1 Jul 2014 01:36:27 +0000 (18:36 -0700)]
Meta-packages

11 years agoauto merge of #92 : alexcrichton/cargo/dash-j, r=wycats
bors [Mon, 30 Jun 2014 23:15:02 +0000 (23:15 +0000)]
auto merge of #92 : alexcrichton/cargo/dash-j, r=wycats

This commit implements the -j flag in the `cargo_rustc` module, using the
primitives from the other commits. The default parllelism is `os::num_cpus()`.

This change also brings proper freshness propagation instead of the hokey logic
of once something is compiled, "compile everything to the right as well".

11 years agoImplement parallel compilation
Alex Crichton [Sun, 29 Jun 2014 04:30:44 +0000 (21:30 -0700)]
Implement parallel compilation

This commit implements the -j flag in the `cargo_rustc` module, using the
primitives from the previous commits. The default parllelism is `os::num_cpus()`

This change also brings proper freshness propagation instead of the hokey logic
of once something is compiled, "compile everything to the right as well".

11 years agoAdd a dependency queue abstraction
Alex Crichton [Sun, 29 Jun 2014 18:03:15 +0000 (11:03 -0700)]
Add a dependency queue abstraction

This data structure is used to track when packages should be built and when they
become buildable. Additionally, it is used to propagate dirtiness throughout the
dependency graph.

11 years agoAdd a task-pool abstraction
Alex Crichton [Sun, 29 Jun 2014 04:23:50 +0000 (21:23 -0700)]
Add a task-pool abstraction

The standard library also provides a task pool, but it's scheduling is not quite
the desired semantics. This task pool instead has all workers contend on a
shared queue to take work from rather than assigning new jobs to specific
workers for forever.

11 years agoMake CargoError inherit from Send
Alex Crichton [Sat, 28 Jun 2014 23:55:02 +0000 (16:55 -0700)]
Make CargoError inherit from Send

Due to a bug in the compiler, this also requires adding `+ Send` any time that
CargoError is mentioned. This change will allow errors to be sent across tasks.

11 years agoAccept -j as a command-line parameter
Alex Crichton [Sat, 28 Jun 2014 23:54:16 +0000 (16:54 -0700)]
Accept -j as a command-line parameter

This parameter will be used to control the number of concurrent builds that
cargo has executing.

11 years agoauto merge of #86 : alexcrichton/cargo/issue-77, r=wycats
bors [Mon, 30 Jun 2014 20:20:07 +0000 (20:20 +0000)]
auto merge of #86 : alexcrichton/cargo/issue-77, r=wycats

Instead, keep a table of what we've visited and halt recursion whenever we
re-visit a package.

11 years agoDon't infinitely recurse on cyclic path deps
Alex Crichton [Sat, 28 Jun 2014 20:33:29 +0000 (13:33 -0700)]
Don't infinitely recurse on cyclic path deps

Instead, keep a table of what we've visited and halt recursion whenever we
re-visit a package.

Closes #77

11 years agoauto merge of #87 : alexcrichton/cargo/toml-warnings, r=wycats
bors [Mon, 30 Jun 2014 20:00:09 +0000 (20:00 +0000)]
auto merge of #87 : alexcrichton/cargo/toml-warnings, r=wycats

Closes #27

11 years agoauto merge of #83 : huonw/cargo/manifest-search, r=alexcrichton,alexcrichton
bors [Mon, 30 Jun 2014 01:15:09 +0000 (01:15 +0000)]
auto merge of #83 : huonw/cargo/manifest-search, r=alexcrichton,alexcrichton

11 years agoCheck for the existence of Cargo.toml when reading packages.
Huon Wilson [Sat, 28 Jun 2014 09:25:32 +0000 (19:25 +1000)]
Check for the existence of Cargo.toml when reading packages.

Fixes #82.

11 years agoGeneralise `find_project` to not always search parents.
Huon Wilson [Sat, 28 Jun 2014 09:24:15 +0000 (19:24 +1000)]
Generalise `find_project` to not always search parents.

Also, add a helper around `find_project` that returns `dir/file` rather
than just `dir`.

11 years agoauto merge of #90 : brson/cargo/fix, r=alexcrichton
bors [Sun, 29 Jun 2014 00:15:06 +0000 (00:15 +0000)]
auto merge of #90 : brson/cargo/fix, r=alexcrichton

This reverts commit 09e52c88d8bf729570e642af4e51c3985672b501, reversing
changes made to bc31d2a23b9ac6b06042e89c9e6ed98474859bf5.

11 years agoRevert "Merge pull request #89 from rust-lang/revert-88-fix"
Brian Anderson [Sun, 29 Jun 2014 00:11:13 +0000 (17:11 -0700)]
Revert "Merge pull request #89 from rust-lang/revert-88-fix"

This reverts commit 09e52c88d8bf729570e642af4e51c3985672b501, reversing
changes made to bc31d2a23b9ac6b06042e89c9e6ed98474859bf5.

11 years agoMerge pull request #89 from rust-lang/revert-88-fix
Brian Anderson [Sun, 29 Jun 2014 00:09:35 +0000 (17:09 -0700)]
Merge pull request #89 from rust-lang/revert-88-fix

Revert "Basic URL canonicalization. Fixes #84"

11 years agoRevert "Basic URL canonicalization. Fixes #84"
Brian Anderson [Sun, 29 Jun 2014 00:09:22 +0000 (17:09 -0700)]
Revert "Basic URL canonicalization. Fixes #84"

11 years agoMerge pull request #88 from brson/fix
Brian Anderson [Sun, 29 Jun 2014 00:08:02 +0000 (17:08 -0700)]
Merge pull request #88 from brson/fix

Basic URL canonicalization. Fixes #84

11 years agoFuture proof URL canonicalization tests
Brian Anderson [Sun, 29 Jun 2014 00:07:49 +0000 (17:07 -0700)]
Future proof URL canonicalization tests

11 years agoAdd tests for URL canonicalization and canonicalize .git extensions
Brian Anderson [Sat, 28 Jun 2014 23:44:56 +0000 (16:44 -0700)]
Add tests for URL canonicalization and canonicalize .git extensions

11 years agoAdd a hack to make github urls case-insensitive. Fixes #84
Brian Anderson [Sat, 28 Jun 2014 23:18:02 +0000 (16:18 -0700)]
Add a hack to make github urls case-insensitive. Fixes #84

11 years agoAccount for trailing / in URLs when determining on-disk location. Fixes #84.
Brian Anderson [Sat, 28 Jun 2014 22:39:48 +0000 (15:39 -0700)]
Account for trailing / in URLs when determining on-disk location. Fixes #84.

No tests because there's no preexisting network tests.

11 years agoWarn about unused TOML keys
Alex Crichton [Fri, 27 Jun 2014 05:53:05 +0000 (22:53 -0700)]
Warn about unused TOML keys

Closes #27

11 years agoauto merge of #75 : samebchase/cargo/add-help-for-test, r=alexcrichton
bors [Sat, 28 Jun 2014 19:43:12 +0000 (19:43 +0000)]
auto merge of #75 : samebchase/cargo/add-help-for-test, r=alexcrichton

11 years agoauto merge of #81 : alexcrichton/cargo/fix-windows, r=wycats
bors [Sat, 28 Jun 2014 19:34:40 +0000 (19:34 +0000)]
auto merge of #81 : alexcrichton/cargo/fix-windows, r=wycats

11 years agoUse a custom rm_rf to paper over windows git funkiness
Alex Crichton [Fri, 27 Jun 2014 21:06:50 +0000 (14:06 -0700)]
Use a custom rm_rf to paper over windows git funkiness

11 years agoauto merge of #78 : huonw/cargo/minor-de-.unwrapping, r=alexcrichton
bors [Fri, 27 Jun 2014 21:12:07 +0000 (21:12 +0000)]
auto merge of #78 : huonw/cargo/minor-de-.unwrapping, r=alexcrichton

I don't think any of the `.unwrap`s I touched can actually be hit since they all seem to have checks earlier, but reducing the number of calls is always nice and makes the code easier to verify.

I'm not sure if the `,` -> `:` commit is actually correct, I was just working from the surrounding context.

11 years agoRemove/refactor some .unwraps.
Huon Wilson [Fri, 27 Jun 2014 11:55:11 +0000 (21:55 +1000)]
Remove/refactor some .unwraps.

Many of these had some precondition being changed that guaranteed they'd
never happen, but could be expressed to just avoid the `.unwrap`
entirely (easier to check).

Other `Option` unwraps were changed to have a mildly more informative
error message by using `.expect`.

11 years agos/,/:/ in what appears to be JSON.
Huon Wilson [Fri, 27 Jun 2014 11:54:09 +0000 (21:54 +1000)]
s/,/:/ in what appears to be JSON.

11 years agoRemove superfluous newline
Samuel Chase [Fri, 27 Jun 2014 10:47:34 +0000 (16:17 +0530)]
Remove superfluous newline

11 years agoAdd command line help text for new subcommand 'cargo test'
Samuel Chase [Fri, 27 Jun 2014 10:43:55 +0000 (16:13 +0530)]
Add command line help text for new subcommand 'cargo test'

11 years agoauto merge of #72 : Arcterus/cargo/master, r=alexcrichton
bors [Fri, 27 Jun 2014 04:45:52 +0000 (04:45 +0000)]
auto merge of #72 : Arcterus/cargo/master, r=alexcrichton

Now Cargo should give a normal error message rather than a task failure when encountering an SSH URL as a dependency.

11 years agoError out on ssh dependencies (fixes #55)
Arcterus [Fri, 27 Jun 2014 03:51:25 +0000 (20:51 -0700)]
Error out on ssh dependencies (fixes #55)

11 years agoauto merge of #70 : alexcrichton/cargo/buildbot, r=wycats
bors [Fri, 27 Jun 2014 03:36:24 +0000 (03:36 +0000)]
auto merge of #70 : alexcrichton/cargo/buildbot, r=wycats

* The installation script was modified to recognize when its running on windows,
  as well as tweaking how it downloads and installs snapshots. The goal here was
  to make the script runnable on buildbot for mac/linux/windows with 32/64 bit
  options on mac/linux.

* The installation script now install rustc to `rustc/bin` in the local
  directory to have parallel builds on buildbot.

* The tests now store all their temporary state locally in the build directory
  to enable parallel builds on buildbot.

* A shell test is ignored which assumed the presence of a TTY output.

11 years agoPrepare for buildbot automation
Alex Crichton [Wed, 25 Jun 2014 23:31:57 +0000 (16:31 -0700)]
Prepare for buildbot automation

* The installation script was modified to recognize when its running on windows,
  as well as tweaking how it downloads and installs snapshots. The goal here was
  to make the script runnable on buildbot for mac/linux/windows with 32/64 bit
  options on mac/linux.

* The installation script now install rustc to `rustc/bin` in the local
  directory to have parallel builds on buildbot.

* The tests now store all their temporary state locally in the build directory
  to enable parallel builds on buildbot.

* A shell test is ignored which assumed the presence of a TTY output.

11 years agoFix temporary error message to be clearer
Yehuda Katz + Carl Lerche [Fri, 27 Jun 2014 00:10:00 +0000 (17:10 -0700)]
Fix temporary error message to be clearer

11 years ago100 chars
Yehuda Katz + Carl Lerche [Thu, 26 Jun 2014 23:51:37 +0000 (16:51 -0700)]
100 chars

11 years agoAdd cargo test
Tim Carey-Smith [Thu, 26 Jun 2014 22:14:31 +0000 (15:14 -0700)]
Add cargo test

11 years agoMerge pull request #64 from alexcrichton/no-recompile-nested-deps
Yehuda Katz [Wed, 25 Jun 2014 23:02:24 +0000 (16:02 -0700)]
Merge pull request #64 from alexcrichton/no-recompile-nested-deps

Don't recompile nested deps too frequently

11 years agoDon't recompile nested deps too frequently
Alex Crichton [Wed, 25 Jun 2014 18:53:19 +0000 (11:53 -0700)]
Don't recompile nested deps too frequently

When compiling a package with a nested dependency, any modification to the outer
package would trigger a recompilation of the inner package. This commit alters
the fingerprint() method to take a PackageId to query about the location of a
package and only lookup the files relevant to that package.

The dependency structure of a PathSource is now everything rooted at the
original Cargo.toml minus all subdirectories which contain a Cargo.toml

11 years agoMerge pull request #56 from alexcrichton/fix-windows-tests
Yehuda Katz [Wed, 25 Jun 2014 18:56:40 +0000 (11:56 -0700)]
Merge pull request #56 from alexcrichton/fix-windows-tests

Fix all tests on windows

11 years agoIgnore \r in output matching
Alex Crichton [Wed, 25 Jun 2014 05:09:23 +0000 (22:09 -0700)]
Ignore \r in output matching

Windows occasionally has \r\n while everywhere else has \n. Instead of worrying
about the difference, just replace all instances of \r with nothing and rely on
matching against \n.

11 years agoFix lots of windows tests
Alex Crichton [Wed, 25 Jun 2014 05:06:11 +0000 (22:06 -0700)]
Fix lots of windows tests

* Add a convenience method bin() for generating the name of a binary. On windows
  this remembers to append `.exe`.

* Stop executing relative paths to binaries and relying on PATH. This is
  suffering from rust-lang/rust#15149 and failing to spawn processes on windows.
  Additionally, this allows the tests to work with a pre-installed cargo becuase
  the freshly built executables are precisely specified.

* A new function, escape_path(), was added for tests. When generated source
  files with paths, this function needs to be called to properly escape the
  \-character that appears in windows path names. Without this function we would
  be generating invalid TOML and rust.

11 years agoSwitch the process builder to starting from ToCStr
Alex Crichton [Wed, 25 Jun 2014 05:05:33 +0000 (22:05 -0700)]
Switch the process builder to starting from ToCStr

This is the same as the libstd Command builder, and will soon be used in the
tests for spawning processes on windows.

11 years agoFix rm_rf on windows
Alex Crichton [Wed, 25 Jun 2014 05:04:57 +0000 (22:04 -0700)]
Fix rm_rf on windows

Apparently git checkouts have objects in the database with permissions 444 which
need to be changed to something with a write permission before removal.

11 years agoDisable terminal tests on windows
Alex Crichton [Wed, 25 Jun 2014 05:04:13 +0000 (22:04 -0700)]
Disable terminal tests on windows

The windows terminal does not use terminfo and is much different, so these tests
will fail on windows or actually write to the console.

11 years agoMove from all-URL to Path/URL enum
Alex Crichton [Wed, 25 Jun 2014 05:02:21 +0000 (22:02 -0700)]
Move from all-URL to Path/URL enum

On windows a path cannot be represented as a file:// URL because of the
backslashes and colons in the file name. This causes all of the tests which rely
on git to fail on windows. This commit changes the representation of the
location of a package to be an enum, Location, with two variants: Remote and
Local.

When parsing Cargo.toml, all locations which begin with the string "file:" have
that prefix stripped and are then interpreted as Local packages. Everything else
is parsed as a URL and used as a Remote package.

11 years agoFix the toml-rs build location
Alex Crichton [Wed, 25 Jun 2014 05:01:02 +0000 (22:01 -0700)]
Fix the toml-rs build location

11 years agoUse correct path separator on windows
Alex Crichton [Tue, 24 Jun 2014 13:54:37 +0000 (06:54 -0700)]
Use correct path separator on windows

11 years agoMerge pull request #63 from dtrebbien/patch-update-toml-rs
Alex Crichton [Wed, 25 Jun 2014 17:40:06 +0000 (13:40 -0400)]
Merge pull request #63 from dtrebbien/patch-update-toml-rs

Update libs/toml-rs

11 years agoUpdate libs/toml-rs
Daniel Trebbien [Wed, 25 Jun 2014 17:10:21 +0000 (13:10 -0400)]
Update libs/toml-rs

Include alexcrichton/toml-rs@66c8348

11 years agoMerge pull request #59 from mcpherrinm/nobloat
Alex Crichton [Wed, 25 Jun 2014 13:32:09 +0000 (09:32 -0400)]
Merge pull request #59 from mcpherrinm/nobloat

Delete tests binary, which doesn't belong

11 years agoMerge pull request #53 from huonw/version-error
Alex Crichton [Wed, 25 Jun 2014 13:16:43 +0000 (09:16 -0400)]
Merge pull request #53 from huonw/version-error

Handle misformatted versions with a nicer error message.

11 years agoHandle misformatted versions with a nicer error message.
Huon Wilson [Wed, 25 Jun 2014 01:48:38 +0000 (11:48 +1000)]
Handle misformatted versions with a nicer error message.

11 years agoRename make distclean -> clean-all
Carl Lerche [Tue, 24 Jun 2014 22:50:15 +0000 (15:50 -0700)]
Rename make distclean -> clean-all

11 years agoAdd support for branch/tag/rev options
Yehuda Katz [Tue, 24 Jun 2014 22:23:03 +0000 (15:23 -0700)]
Add support for branch/tag/rev options

11 years agoUpdate README.md
Yehuda Katz [Tue, 24 Jun 2014 20:37:28 +0000 (13:37 -0700)]
Update README.md

11 years agoMerge pull request #49 from o11c/install-paths
Yehuda Katz [Tue, 24 Jun 2014 20:34:40 +0000 (13:34 -0700)]
Merge pull request #49 from o11c/install-paths

Correct installation to follow standards

11 years agoMerge pull request #48 from gilles-leblanc/issue40
Yehuda Katz [Tue, 24 Jun 2014 20:29:56 +0000 (13:29 -0700)]
Merge pull request #48 from gilles-leblanc/issue40

Adds .vagrant files to .gitignore

11 years agoRemoves vagrant files from project
Gilles Leblanc [Tue, 24 Jun 2014 16:29:17 +0000 (12:29 -0400)]
Removes vagrant files from project

Fixes #40

11 years agoMerge pull request #50 from alexcrichton/license
Brian Anderson [Tue, 24 Jun 2014 19:50:19 +0000 (12:50 -0700)]
Merge pull request #50 from alexcrichton/license

Add the standard Rust Apache/MIT license

11 years agoAdd the standard Rust Apache/MIT license
Alex Crichton [Tue, 24 Jun 2014 15:10:31 +0000 (08:10 -0700)]
Add the standard Rust Apache/MIT license

This copies the same Apache and MIT license files from the rust-lang/rust
repository to the cargo repository. It notable retains the same copyright line
as the rust repository:

    Copyright (c) 2014 The Rust Project Developers

The COPYRIGHT file from the rust repository was not copied over as it looked
like it mainly contained information about third party dependencies, which cargo
does not have yet.

The wording at the end of the rust repository's README.md was also copied over
to cargo's README.md with tweaks to not mention COPYRIGHT and third-party BSD
licenses.

Closes #34

11 years agoCorrect installation to follow standards
Ben Longbons [Tue, 24 Jun 2014 18:10:27 +0000 (11:10 -0700)]
Correct installation to follow standards

11 years agoClarify `make install` exists as a target
Alex Crichton [Tue, 24 Jun 2014 13:44:47 +0000 (06:44 -0700)]
Clarify `make install` exists as a target

Closes #39

11 years agoUpdate README.md
Yehuda Katz [Tue, 24 Jun 2014 06:09:03 +0000 (23:09 -0700)]
Update README.md

11 years agoMerge pull request #31 from alexcrichton/hotfix-windows2
Yehuda Katz [Tue, 24 Jun 2014 05:49:11 +0000 (22:49 -0700)]
Merge pull request #31 from alexcrichton/hotfix-windows2

Work around \-characters on Windows for now

11 years agoWork around \-characters on Windows for now
Alex Crichton [Tue, 24 Jun 2014 05:21:19 +0000 (22:21 -0700)]
Work around \-characters on Windows for now

11 years agoRename cargo-compile to cargo-build
Yehuda Katz [Tue, 24 Jun 2014 02:09:12 +0000 (19:09 -0700)]
Rename cargo-compile to cargo-build

11 years agoOnly force update git if -u is passed
Yehuda Katz [Tue, 24 Jun 2014 01:54:13 +0000 (18:54 -0700)]
Only force update git if -u is passed

This will become moot once we have a lockfile, because we'll be able to
check whether the last rev we used is still available and skip fetching.

11 years agoAllow absent git version
Yehuda Katz [Tue, 24 Jun 2014 00:38:43 +0000 (17:38 -0700)]
Allow absent git version

11 years agoGitSource delegates to PathSource for path ops
Carl Lerche [Tue, 24 Jun 2014 00:03:13 +0000 (17:03 -0700)]
GitSource delegates to PathSource for path ops

11 years agoFix the README
Yehuda Katz [Tue, 24 Jun 2014 00:02:22 +0000 (17:02 -0700)]
Fix the README

11 years agoSupport [package] or [project]
Yehuda Katz [Mon, 23 Jun 2014 23:57:27 +0000 (16:57 -0700)]
Support [package] or [project]

The plan is to free up [project] for simpler config plus output flags
like -O that don't make sense in packages.

11 years agoMerge pull request #29 from cmr/make-install
Yehuda Katz [Mon, 23 Jun 2014 23:34:44 +0000 (16:34 -0700)]
Merge pull request #29 from cmr/make-install

Makefile: support install, makes packaging easier

11 years agoSpecify the SourceId that the path source represents
Carl Lerche [Mon, 23 Jun 2014 23:16:22 +0000 (16:16 -0700)]
Specify the SourceId that the path source represents

11 years agoMakefile: support install, makes packaging easier
Corey Richardson [Mon, 23 Jun 2014 22:33:14 +0000 (15:33 -0700)]
Makefile: support install, makes packaging easier

11 years agoMerge pull request #28 from alexcrichton/new-toml
Yehuda Katz [Mon, 23 Jun 2014 21:13:59 +0000 (14:13 -0700)]
Merge pull request #28 from alexcrichton/new-toml

Move from rust-toml to toml-rs

11 years agoMove from rust-toml to toml-rs
Alex Crichton [Mon, 23 Jun 2014 15:39:50 +0000 (08:39 -0700)]
Move from rust-toml to toml-rs

This commit should greatly improve all error messages related to decoding
Cargo.toml.

11 years agoFix long lines
Alex Crichton [Mon, 23 Jun 2014 17:30:25 +0000 (10:30 -0700)]
Fix long lines

11 years agoFix a red test
Alex Crichton [Mon, 23 Jun 2014 16:44:00 +0000 (09:44 -0700)]
Fix a red test

11 years agoSimplify flags
Yehuda Katz [Sun, 22 Jun 2014 06:51:55 +0000 (23:51 -0700)]
Simplify flags

11 years agoImprove error messages
Yehuda Katz [Sun, 22 Jun 2014 06:16:12 +0000 (23:16 -0700)]
Improve error messages

11 years agoMore shell refactoring
Yehuda Katz [Sun, 22 Jun 2014 06:02:38 +0000 (23:02 -0700)]
More shell refactoring

11 years agoThread the shell through more of the system
Yehuda Katz [Sun, 22 Jun 2014 05:22:56 +0000 (22:22 -0700)]
Thread the shell through more of the system

11 years agoTerminal colors
Yehuda Katz [Sun, 22 Jun 2014 01:53:07 +0000 (18:53 -0700)]
Terminal colors

11 years agoAdds initial usage support
Yehuda Katz [Sat, 21 Jun 2014 23:15:31 +0000 (16:15 -0700)]
Adds initial usage support

11 years agoImprove error messages
Yehuda Katz [Sat, 21 Jun 2014 06:26:19 +0000 (23:26 -0700)]
Improve error messages

11 years agoMake try! an extended version of std::try!
Yehuda Katz [Sat, 21 Jun 2014 02:18:06 +0000 (19:18 -0700)]
Make try! an extended version of std::try!

The only caveat to this is that you cannot use try! inside of a function
that return a Result to another function that expects a totally generic
error.

The primary case of this is Encodable/Decodable, which call into
user-specified methods, expecting an `E` back. In these (extremely
unusual) cases, you can use raw_try!.

Of note:

* Once Error lands in core (optimistic much?), Encodable/Decodable can
  be changed to expect an E: Error + FromError<E>.
* This works fine with concrete error types, since FromError maps things
  like IoError to IoError. The only reason it doesn't work with totally
  generic E is that we can't implement FromError<Box<Error>> for
  impl Error and FromError<E> for E.

11 years agoHandle some errors better
Tim Carey-Smith + Tom Dale [Sat, 21 Jun 2014 00:51:35 +0000 (17:51 -0700)]
Handle some errors better

Also, use cargo_try in more places

11 years agoMerge pull request #25 from alexcrichton/fingerprints
Yehuda Katz [Fri, 20 Jun 2014 05:13:29 +0000 (22:13 -0700)]
Merge pull request #25 from alexcrichton/fingerprints

Don't rebuild dependencies if they haven't changed

11 years agoDon't rebuild dependencies if they haven't changed
Alex Crichton [Fri, 20 Jun 2014 01:53:18 +0000 (18:53 -0700)]
Don't rebuild dependencies if they haven't changed

This commit adds support for recognizing "fingerprints" of upstream
dependencies. When a dependency's fingerprint change, it must be rebuilt.
Currently the fingerprint unconditionally includes the version of the compiler
you're using as well as a specialized version depending on the type of source
you're compiling from:

  - git sources return their fingerprint as the current SHA. This will
    disregard any local changes.
  - path sources return their fingerprint as the maximum mtime of any file found
    at the location. This is a little too coarse and may rebuild packages too
    often (due to sub-packages), but this should get the job done for now.

When executing `cargo compile`, dependencies are not rebuilt if their
fingerprint remained constant.

11 years agoMerge pull request #23 from alexcrichton/crate-types
Yehuda Katz [Fri, 20 Jun 2014 02:49:56 +0000 (19:49 -0700)]
Merge pull request #23 from alexcrichton/crate-types

Invoke rustc only once for multiple crate types

11 years agoInvoke rustc only once for multiple crate types
Alex Crichton [Thu, 19 Jun 2014 22:21:00 +0000 (15:21 -0700)]
Invoke rustc only once for multiple crate types

11 years agoMerge pull request #24 from alexcrichton/style
Yehuda Katz [Fri, 20 Jun 2014 01:58:52 +0000 (18:58 -0700)]
Merge pull request #24 from alexcrichton/style

Update to rust style guidelines